package com.sjq.supplier.controller;


import com.sjq.supplier.util.Result;
import lombok.extern.slf4j.Slf4j;
import com.sjq.supplier.entity.Warehouseinfo;
import com.sjq.supplier.service.WarehouseinfoService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * (Warehouseinfo)表控制层
 *
 * @author makejava
 * @since 2024-01-02 14:54:53
 */
@Slf4j
@RestController
@RequestMapping("warehouseinfo")
public class WarehouseinfoController {
    /**
     * 服务对象
     */
    @Resource
    private WarehouseinfoService warehouseinfoService;

    /**
     * 分页查询所有数据
     *
     * @param warehouseinfo 查询实体
     * @return 所有数据
     */
    @GetMapping("selectAll")
    public Result selectAll(Warehouseinfo warehouseinfo, Integer limit, Integer page,String username) {
        if (limit == null || page == null) {
            return Result.failure("limit和page不能为空");
        }
        return warehouseinfoService.selectAll(warehouseinfo,limit,page,username);
    }



}

